home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15170 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  66 lines

  1. Path: sun.uakom.sk!usenet
  2. From: "Billik Stefan - 2.PEF" <billik@sun.uniag.sk>
  3. Newsgroups: comp.lang.c
  4. Subject: curses.h <-- getch()  ?
  5. Date: Wed, 17 Apr 1996 18:16:49 -0100
  6. Organization: FVS PEF VSP in NItra
  7. Message-ID: <317543A1.75A8@sun.uniag.sk>
  8. NNTP-Posting-Host: sun.uniag.sk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.4 sun4m)
  13.  
  14. My problem is that this program don't like our cc && gcc compilers:
  15.  
  16. -------------------------
  17. /* It should do this thing:
  18.    after eighth character it should print it on screen
  19.    - means without <ENTER>
  20. */
  21.  
  22. #include <stdio.h>
  23. #include <string.h>
  24. #include <signal.h>
  25. #include <curses.h>
  26.  
  27. main()
  28. {
  29.  
  30.  char ch[9];
  31.  int i;
  32.  
  33.  printf("\n Press 8 characters ... \n");
  34.  
  35.  for ( i=0 ; i<=8 ; i++ )
  36.  ch[i]=getch();
  37.  printf("\n %s \n", ch[0]);
  38.  
  39. }
  40.  
  41. -------------------------
  42. During compilation:
  43.  
  44.  18:02 /usr1/users/student/billik/C/$ cc c/getstring.c
  45. Undefined                       first referenced
  46.  symbol                             in file
  47. wgetch                              getstring.o
  48. stdscr                              getstring.o
  49. ld: fatal: Symbol referencing errors. No output written to a.out
  50.  18:02 /usr1/users/student/billik/C/$ 
  51.  
  52. also with gcc.
  53. What do you think ?
  54. -- 
  55.     \\|//                                                 \\|//      
  56.     (o o)           http://sai.uniag.sk/~billik           (o o)      
  57. -ooO-(_)-Ooo-------------------------------------------ooO-(_)-Ooo-  
  58.                           billik@sun.uniag.sk                        
  59.                                                              steve.  
  60. PS: The best way to explain is example.                              
  61.                                                                      
  62. PS1: SunOS 5.4                                                       
  63. PS2: cc:                                                             
  64.      ld: Software Generation Utilities (SGU) SunOS/ELF (LK-1.4 (S/I))
  65.      gcc: gcc version 2.6.3
  66.